package com.self.finance.structmap;

import com.self.finance.dto.CoinDto;
import com.self.finance.model.Coin;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @version v1.0
 * @ClassName: CoinStructMap
 * @Description:
 * @Author: Mac
 * @Date: 2022/8/14 17:44
 */
@Mapper(componentModel = "spring")
public interface CoinStructMap {

    CoinStructMap INSTANCE = Mappers.getMapper(CoinStructMap.class);

    CoinDto toDto(Coin coin);

    List<CoinDto> toDtoList(List<Coin> coins);
}
